package com.mystudy.management.usermanagement.service;

import cn.dev33.satoken.stp.StpUtil;
import com.mystudy.management.usermanagement.dao.pojo.Admin;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

@Service
//声明事务
@Transactional(
        isolation = Isolation.REPEATABLE_READ//事务隔离级别：可重复读
)
public class LogoutServiceImpl implements LogoutService{

    //退出登录
    @Override
    public void logout() {
        StpUtil.logout(StpUtil.getLoginId());
    }
}


